<!--
  * 首页
  *
  * @Author:    zhoujk
  * @Date:      2022-09-12 22:34:00
  *
-->
<template>
  <!--  顶部用户信息-->
  <a-row>
    <operationPersonInfo :id="userId" v-if="userType === ZZB_USER_TYPE_ENUM.USER_TYPE_PLATFORM.value" />
    <agentPersonInfo :id="userId" v-if="userType === ZZB_USER_TYPE_ENUM.USER_TYPE_AGENT.value" />
    <merchantPersonInfo :id="userId" v-if="userType === ZZB_USER_TYPE_ENUM.USER_TYPE_MERCHANT.value" />
  </a-row>
</template>
<script setup>
  import { ref } from 'vue'
  import operationPersonInfo from './components/operationPersonInfo.vue'
  import agentPersonInfo from './components/agentPersonInfo.vue'
  import merchantPersonInfo from './components/merchantPersonInfo.vue'
  import { ZZB_USER_TYPE_ENUM } from '/@/constants/system/system-const.js'
  import { useUserStore } from '/@/store/modules/system/user.js'
  import { localRead } from '/@/utils/local-util.js'
  import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js'

  const state = useUserStore()
  const userType = parseInt(localRead(LocalStorageKeyConst.USER_TYPE))
  const userId = ref(state.userId)
</script>
<style lang="less" scoped>
  @import './index.less';
</style>
